begin tran
declare @style_id int
declare cu_style cursor for
select distinct style_id 
from ms_style_mobil_qty a join ms_style_mobil b on a.style_id = b.id 
where b.create_date >= '2013.12.18'
open cu_style
fetch cu_style into @style_id 
while @@fetch_status = 0
begin
exec pr1218GenSku @style_id
	fetch cu_style into @style_id 

end
close cu_style
deallocate cu_style
select * from pos_sku a
where exists(select * from ms_style_mobil aa 
where a.style_no = aa.style_no)
commit tran
 
